/* Copyright (c) 2004-2024 Peigen.info. All rights reserved. */

package info.peigen.hotpot.business.customer.core.repository.entity;

import com.gitee.peigenlpy.actable.annotation.Column;
import com.gitee.peigenlpy.actable.annotation.Index;
import com.gitee.peigenlpy.actable.annotation.Table;
import com.gitee.peigenlpy.actable.constants.MySqlCharsetConstant;
import com.gitee.peigenlpy.actable.constants.MySqlEngineConstant;
import com.gitee.peigenlpy.actable.constants.MySqlTypeConstant;
import info.peigen.hotpot.business.customer.facade.enums.auth.CustomerCertRole;
import info.peigen.hotpot.common.core.enums.CertType;
import info.peigen.hotpot.component.data.repository.beetlsql.entity.AbstractCreateTimeEntity;
import lombok.*;
import lombok.experimental.Accessors;
import lombok.experimental.FieldDefaults;

import java.util.Date;

/**
 * <b>(CustomerAuthenticationLogEntity)</b>
 *
 * @author Peigen
 * @version 1.0.0
 * @since 2021/8/18
 */
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@FieldDefaults(level = AccessLevel.PRIVATE)
@Accessors(chain = true)
@Table(name = "customer_authentication_identity", comment = "客户实名认证身份信息表", charset = MySqlCharsetConstant.UTF8MB4, engine = MySqlEngineConstant.InnoDB)
@org.beetl.sql.annotation.entity.Table(name = "customer_authentication_identity")
public class CustomerAuthenticationIdentityEntity extends AbstractCreateTimeEntity {
    @Column(name = "customer_id", type = MySqlTypeConstant.VARCHAR, length = 30, isNull = false, comment = "customerId")
    @Index(value = "customerId", columns = "customer_id")
    @org.beetl.sql.annotation.entity.Column("customer_id")
    String           customerId;
    @Column(name = "name", type = MySqlTypeConstant.VARCHAR, length = 100, comment = "姓名")
    @org.beetl.sql.annotation.entity.Column("name")
    String           name;
    @Column(name = "english_name", type = MySqlTypeConstant.VARCHAR, length = 100, comment = "英文名称")
    @org.beetl.sql.annotation.entity.Column("english_name")
    String           englishName;
    @Column(name = "number", type = MySqlTypeConstant.VARCHAR, length = 40, comment = "身份证号")
    @Index(value = "number", columns = "number")
    @org.beetl.sql.annotation.entity.Column("number")
    String           number;
    @Column(name = "customer_cert_role", type = MySqlTypeConstant.VARCHAR, length = 40, comment = "认证角色;Legal_Representative:法定代表人,Enterprise_Partner:企业董事/实际控制人/股东,Enterprise_Licensor:被授权人")
    @org.beetl.sql.annotation.entity.Column("customer_cert_role")
    CustomerCertRole customerCertRole;
    @Column(name = "customer_cert_type", type = MySqlTypeConstant.VARCHAR, length = 40, comment = "证件类型;Identity_Card:身份证,Uniform_Social_Credit_Code,统一社会信用代码")
    @org.beetl.sql.annotation.entity.Column("customer_cert_type")
    CertType         customerCertType;
    @Column(name = "front_image", type = MySqlTypeConstant.VARCHAR, length = 520, comment = "身份证照片-正面")
    @org.beetl.sql.annotation.entity.Column("front_image")
    String           frontImage;
    @Column(name = "back_image", type = MySqlTypeConstant.VARCHAR, length = 520, comment = "身份证照片-背面")
    @org.beetl.sql.annotation.entity.Column("back_image")
    String           backImage;
    @Column(name = "holding_id_image", type = MySqlTypeConstant.VARCHAR, length = 520, comment = "手持身份证照片")
    @org.beetl.sql.annotation.entity.Column("holding_id_image")
    String           holdingIdImage;
    @Column(name = "period_of_validity", type = MySqlTypeConstant.VARCHAR, length = 40, comment = "有效期")
    @org.beetl.sql.annotation.entity.Column("period_of_validity")
    String           periodOfValidity;
    @Column(name = "period_of_validity_start", type = MySqlTypeConstant.DATE, comment = "有效期始")
    @org.beetl.sql.annotation.entity.Column("period_of_validity_start")
    Date             periodOfValidityStart;
    @Column(name = "period_of_validity_end", type = MySqlTypeConstant.DATE, comment = "有效期止")
    @org.beetl.sql.annotation.entity.Column("period_of_validity_end")
    Date             periodOfValidityEnd;
    @Column(name = "period_of_validity_long_term", type = MySqlTypeConstant.VARCHAR, length = 16, comment = "是否长期有效，Y:是,N:否")
    @org.beetl.sql.annotation.entity.Column("period_of_validity_long_term")
    String           periodOfValidityLongTerm;
}